package nl.boelen.game.handler.key;

public class PauseKey extends Key {
    private boolean paused;

    public PauseKey(String name) {
        super(name);
    }

    @Override
    public void toggle(boolean pressed) {
        if (isPressed != pressed) {
            this.isPressed = pressed;
            if (isPressed) {
                timesPressed++;
                paused = !paused;
            }
        }
    }
    
    public boolean isPaused(){
        return paused;
    }
}
